package com.th.controller;

import com.th.common.vo.UserInfoVo;
import com.th.config.web.BaseController;
import com.th.service.UsUserService;
import io.swagger.annotations.Api;
import org.springframework.http.HttpRequest;
import org.springframework.web.HttpRequestHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

/**
 * @Author tuhang
 * @PackageName nswcy-crowdsource-client-server
 * @Package com.th.controller
 * @Date 2023/6/7 15:46
 * @Version 1.0
 */
@RestController
@Api(tags = "用户信息接口")
@RequestMapping("/api/user")
public class UsUserController extends BaseController {

    @Resource
    private UsUserService usUserService;

    @GetMapping("/getInfo")
    public UserInfoVo getInfo(@RequestHeader("token") String token){
        UserInfoVo userInfoVo = usUserService.getUserInfo(token);
        return userInfoVo;
    }



}
